# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-unique-log-filter
_pkgname=unique_log_filter
pkgver=0.1.0
pkgrel=2
pkgdesc='A log filter that removes duplicate log messages.'
arch=('any')
url='https://pypi.org/project/unique-log-filter/#files'
license=('BSD-3-Clause')
depends=('python' 'python-flit-core')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('506632e9d6e411cb51e5a1b644107499bc07cac29fa320e832fd8dd69ea0230f68d337b9830aa3ed682ff91257b7e10ab4e40045a7bfc5abaf0537d60eea27a1')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

